home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3c / ssdi.z / ssdi
Text File  |  1998-10-20  |  11KB  |  132 lines

  1.  
  2.  
  3.  
  4. SSSSSSSSDDDDIIII((((3333CCCC))))                                                              SSSSSSSSDDDDIIII((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd - consult configuration file and load DSO
  10.      corresponding to the source for a given system database
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_ssss_dddd_iiii_...._hhhh_>>>>
  14.      _iiii_nnnn_tttt _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd_((((_cccc_hhhh_aaaa_rrrr _****_dddd_bbbb_nnnn_aaaa_mmmm_eeee_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_ssss_dddd_iiii_cccc_oooo_nnnn_ffff_iiii_gggg_iiii_nnnn_ffff_oooo _****_cccc_ffff_iiii_nnnn_ffff_oooo_,,,,
  15.           _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_ssss_dddd_iiii_ssss_rrrr_cccc_iiii_nnnn_ffff_oooo _****_ssss_rrrr_cccc_iiii_nnnn_ffff_oooo_))))_;;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd function provides the means for an
  19.      application to load the dynamic shared object (DSO) corresponding to a
  20.      source for a given system database. A _dddd_aaaa_tttt_aaaa_bbbb_aaaa_ssss_eeee is a collection of
  21.      information related to users, groups, networks, etc. that the operating
  22.      system expects to be maintained by user-level libraries.  For example,
  23.      information relating to users is encapsulated by the _pppp_aaaa_ssss_ssss_wwww_dddd database.
  24.      Each such has a definite _iiii_nnnn_tttt_eeee_rrrr_ffff_aaaa_cccc_eeee. For example, the ggggeeeettttppppwwwweeeennnntttt((((3333CCCC))))
  25.      routines define the interface for the passwd database.  The information
  26.      contained in a given database  may be stored in multiple _ssss_oooo_uuuu_rrrr_cccc_eeee_ssss. Almost
  27.      all standard databases come with sources that are _cccc_oooo_mmmm_pppp_iiii_llll_eeee_dddd_----_iiii_nnnn with the
  28.      interface. The _ffff_iiii_llll_eeee_ssss source for the passwd database which maintains
  29.      relevant information in files is one such.  A _DDDD_yyyy_nnnn_aaaa_mmmm_iiii_cccc source for a
  30.      database is one whose implementation is not fixed at the time of
  31.      compilation of interface for the database.  Thus, a dynamic source allows
  32.      for custom implementations of database repositories.
  33.  
  34.      The file ////eeeettttcccc////ssssssssddddiiii....ccccoooonnnnffff (see _ssss_ssss_dddd_iiii(4)) is used to add a dynamic source for
  35.      a database.  Each application can cache configuration information for a
  36.      given database using a variable of type _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_ssss_dddd_iiii_cccc_oooo_nnnn_ffff_iiii_gggg_iiii_nnnn_ffff_oooo, which
  37.      includes the following members:
  38.  
  39.      _iiii_nnnn_tttt  _ssss_ssss_dddd_iiii______cccc_iiii______gggg_oooo_tttt______cccc_oooo_nnnn_ffff_iiii_gggg          If non-zero, the rest of the fields
  40.                                       contain configuration information.
  41.  
  42.      _cccc_hhhh_aaaa_rrrr _****_ssss_ssss_dddd_iiii______cccc_iiii______dddd_ssss_rrrr_cccc_ssss_[[[[______SSSS_SSSS_DDDD_IIII______MMMM_AAAA_XXXX_SSSS_RRRR_CCCC_SSSS_]]]]
  43.                                       Names of dynamic sources for the given
  44.                                       database.
  45.  
  46.      _cccc_hhhh_aaaa_rrrr _****_****_ssss_ssss_dddd_iiii______cccc_iiii______cccc_uuuu_rrrr_rrrr_dddd_ssss_rrrr_cccc          Next dynamic source to load. Pointer to
  47.                                       the name in the above array.
  48.  
  49.      Initially, the variable used to cache configuration information should be
  50.      set to ______SSSS_SSSS_DDDD_IIII______IIII_nnnn_iiii_tttt_CCCC_oooo_nnnn_ffff_iiii_gggg_IIII_nnnn_ffff_oooo.
  51.  
  52.      Each dynamic source should be implemented as a DSO, and should reside in
  53.      a standard directory as defined by ______SSSS_SSSS_DDDD_IIII______SSSS_TTTT_DDDD______SSSS_RRRR_CCCC______DDDD_IIII_RRRR. The DSO should
  54.      export a variable which represents a vector of functions. This vector
  55.      contains addresses of functions which implement corresponding
  56.      functionality of the database interface. The correspondence between the
  57.      vector and the routines of the database interface is defined in a
  58.      database specific header file, _<<<<_dddd_iiii_____{_d_a_t_a_b_a_s_e-_n_a_m_e}_...._hhhh_>>>>.  For example, the
  59.      file _<<<<_dddd_iiii______gggg_rrrr_oooo_uuuu_pppp_...._hhhh_>>>> defines the correspondence for the _gggg_rrrr_oooo_uuuu_pppp database. If a
  60.  
  61.  
  62.                                                                         PPPPaaaaggggeeee 1111
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. SSSSSSSSDDDDIIII((((3333CCCC))))                                                              SSSSSSSSDDDDIIII((((3333CCCC))))
  70.  
  71.  
  72.  
  73.      source does not implement a particular routine then the corresponding
  74.      element in the vector should be set to _NNNN_UUUU_LLLL_LLLL.
  75.  
  76.      On its very first invocation, _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd function gathers
  77.      information for the database _dddd_bbbb_nnnn_aaaa_mmmm_eeee from the configuration file, and
  78.      caches it in the variable pointed to by _cccc_ffff_iiii_nnnn_ffff_oooo.  Then, it loads (using
  79.      _d_l_o_p_e_n(3)) the DSO corresponding to the first source listed in the
  80.      configuration.  Information concerning the loaded source is returned in
  81.      _ssss_rrrr_cccc_iiii_nnnn_ffff_oooo, which is of type _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_ssss_dddd_iiii_ssss_rrrr_cccc_iiii_nnnn_ffff_oooo, and has the following
  82.      fields:
  83.  
  84.      _cccc_hhhh_aaaa_rrrr _ssss_ssss_dddd_iiii______ssss_iiii______nnnn_aaaa_mmmm_eeee_[[[[______SSSS_SSSS_DDDD_IIII______MMMM_AAAA_XXXX_SSSS_RRRR_CCCC_NNNN_AAAA_MMMM_EEEE_]]]]
  85.                                       The name of the source that was loaded.
  86.  
  87.      ______SSSS_SSSS_DDDD_IIII______VVVV_OOOO_IIII_DDDD_FFFF_UUUU_NNNN_CCCC  _****_ssss_ssss_dddd_iiii______ssss_iiii______ffff_uuuu_nnnn_cccc_ssss   A pointer to the vector of routines
  88.                                       implemented by the source; resolved
  89.                                       using _d_l_s_y_m(3) from the DSO
  90.                                       corresponding to the source.
  91.  
  92.      On subsequent invocations (with the same arguments),
  93.      _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd loads the next source in the cached
  94.      configuration information; _ssss_rrrr_cccc_iiii_nnnn_ffff_oooo is overwritten with data from this new
  95.      source.  Since  _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd maintains state between
  96.      invocations in _cccc_ffff_iiii_nnnn_ffff_oooo, it should not be manipulated by the caller, except
  97.      for proper initialization before the first invocation.
  98.  
  99. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  100.      _ssss_ssss_dddd_iiii(4), _dddd_llll_oooo_pppp_eeee_nnnn(3), _dddd_llll_ssss_yyyy_mmmm(3), _gggg_eeee_tttt_pppp_wwww_eeee_nnnn_tttt_((((_3333_CCCC_))))_,,,, _gggg_eeee_tttt_gggg_rrrr_eeee_nnnn_tttt_((((_3333_CCCC_))))
  101.  
  102. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  103.      If a source was successfully loaded, _ssss_ssss_dddd_iiii______gggg_eeee_tttt______cccc_oooo_nnnn_ffff_iiii_gggg______aaaa_nnnn_dddd______llll_oooo_aaaa_dddd returns
  104.      zero. Otherwise, a non-zero value is returned.
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                                                         PPPPaaaaggggeeee 2222
  129.  
  130.  
  131.  
  132.